home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mission 3
/
Mission 3.zip
/
Mission 3.iso
/
demovers
/
scripter
/
demo
/
uploader.sic
< prev
Wrap
Text File
|
1998-09-26
|
1KB
|
73 lines
/*
* Uploader-Statistik ueber die angegebene(n) Fileliste(n) erstellen
*/
if (argc == 0) {
argv.length = 1;
argc = 1;
argv[0] = "";
if (fsel(argv[0], "Fileliste auswählen", "*.lst")==0)
exit(1);
}
while (argc) {
file = argv[--argc];
maus = "";
gpt = "";
while (getline(file, line)) { // Zeile einlesen
tok = split(line, " "); // im Worte zerlegen
c = line[0];
if (c >= '0' && c <= '9') { // Kopfzeile?
temp = tok[1];
if (temp == "ST") temp = "ST TOS";
systems[temp]++; // Einträge/System
entries++; // Einträge gesamt
}
else {
if (tok.length >= 4 && tok[0] == "Von"
&& tok[3] == "@") {
temp = tok[1] + " " + tok[2]; // Uploader-Name
uploader[temp]++;
}
else if (tok[0] == "Fileliste") {
maus = line;
}
else if (tok[0] == "Gruppenprogrammteil") {
gpt = line;
}
}
}
printf("%s\n%s\n", maus, gpt);
/*
* Liste: Archive pro Betriebsystem
*/
with (i in systems) {
printf("%9s: %4d\n", i, systems[i]);
}
print("---------------");
printf(" Gesamt: %4d\n\n", entries);
/*
* Liste: Alle Mauser, die mehr als 9 Archive hochgeladen haben
* (zweispaltig: <Name> <Anzahl Uploads>)
*/
cnt = 0;
with (i in uploader) {
if (uploader[i] > 9) {
if (cnt == 0) {
sprintf(temp, "%22s: %4d", i, uploader[i]);
cnt = 1;
}
else {
printf("%s %22s: %4d\n", temp, i, uploader[i]);
cnt = 0;
}
}
}
if (cnt) print(temp);
}